home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Development / Source / Gravity Mouse 1.1 Source / Gravity mouse ƒ / gravity.c < prev    next >
C/C++ Source or Header  |  1993-11-13  |  1KB  |  49 lines

  1. /**********************************************************************\
  2.  
  3. File:        gravity.c
  4.  
  5. Purpose:    This module handles installing the VBL from a 'vbl '
  6.             resource.
  7.             
  8.  
  9. Gravity Mouse -=- add gravity to your mouse
  10. Copyright (C) 1993 Mark Pilgrim
  11.  
  12. This program is free software; you can redistribute it and/or modify
  13. it under the terms of the GNU General Public License as published by
  14. the Free Software Foundation; either version 2 of the License, or
  15. (at your option) any later version.
  16.  
  17. This program is distributed in the hope that it will be useful,
  18. but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20. GNU General Public License for more details.
  21.  
  22. You should have received a copy of the GNU General Public License
  23. along with this program in a file named "GNU General Public License".
  24. If not, write to the Free Software Foundation, 675 Mass Ave,
  25. Cambridge, MA 02139, USA.
  26.  
  27. \**********************************************************************/
  28.  
  29. #include "Retrace.h"
  30.  
  31. void main(void);
  32.  
  33. void main(void)
  34. {
  35.     VBLTask         *vblPtr;
  36.     Handle            ourCode;
  37.     
  38.     ourCode = GetResource('vbl ', 668);
  39.     HLock(ourCode);
  40.     DetachResource(ourCode);
  41.     
  42.     vblPtr = (VBLTask*) NewPtrSys(sizeof(VBLTask));
  43.     vblPtr->qType = vType;
  44.     vblPtr->vblAddr = (ProcPtr) *ourCode;
  45.     vblPtr->vblCount = 2500;
  46.     vblPtr->vblPhase = 0;
  47.     VInstall(vblPtr);
  48. }
  49.